home *** CD-ROM | disk | FTP | other *** search
- Path: lrz-muenchen.de!news
- From: watzka@stat.uni-muenchen.de (Kurt Watzka)
- Newsgroups: comp.lang.c
- Subject: Re: Obtaining file lists in C?
- Date: 15 Apr 1996 09:09:05 GMT
- Organization: Leibniz-Rechenzentrum, Muenchen (Germany)
- Distribution: world
- Message-ID: <4kt3nh$n1k@sparcserver.lrz-muenchen.de>
- References: <gcraig.1.001653A2@interaccess.com>
- NNTP-Posting-Host: sun2.lrz-muenchen.de
- Keywords: files, lists, listings, directory
-
- gcraig@interaccess.com (George Craig) writes:
-
- >Could someone please tell me just one of the many ways I could implement an
- >efficient file listing technique in standard ANSI or k&R c?
-
- You do not need just any method, but it must be an "efficient" method?
- If you have an inefficient method that works with your system, why
- don't you post it so that you can get some hints on what might be
- inefficient about it?
-
- To get a list of all files in a directory in standard ANSI C, you will
- have to ask the user to type it in. C is not aware of file systems,
- so all answers will be system specific. For answers for some systems
- see the question "How can I read a directory in a C program?" in the
- FAQ. If you need a more efficient method, feel free to implement one.
-
- Kurt
- --
- | Kurt Watzka Phone : +49-89-2180-6254
- | watzka@stat.uni-muenchen.de
-